/*
 * XCMouse
 * http://code.google.com/p/bit-eclipse/wiki/XCMouse
 *
 * Copyright 2012, Denzel Morris
 * Licensed under the MIT License.
 * See License.txt
 */

#pragma once
#ifndef __CONTROLLER_STATE_H_INC__
#define __CONTROLLER_STATE_H_INC__

/////////////////////////////////////////////////////////////////////
//
// A simple structure to manage the data passed to a slot that
// wants information about the changes in controller state
//
/////////////////////////////////////////////////////////////////////
struct ControllerState {
	ControllerState() : ButtonsFlag(0), ldx(0), ldy(0), rdx(0), rdy(0) {}
	unsigned int ButtonsFlag;
	float ldx;
	float ldy;
	float rdx;
	float rdy;
};

const unsigned int BUTTON_A_UP   = 0x1;
const unsigned int BUTTON_B_UP   = 0x2;
const unsigned int BUTTON_X_UP   = 0x4;
const unsigned int BUTTON_Y_UP   = 0x8;
const unsigned int BUTTON_A_DOWN = 0x10;
const unsigned int BUTTON_B_DOWN = 0x20;
const unsigned int BUTTON_X_DOWN = 0x40;
const unsigned int BUTTON_Y_DOWN = 0x80;

#endif // __CONTROLLER_STATE_H_INC__